﻿<%@ Page Title="二次确认管理" Language="C#" MasterPageFile="~/MMhome.Master" AutoEventWireup="true"
    CodeBehind="MdoubleManage.aspx.cs" Inherits="MobileManager.MdoubleManage" %>

<%@ Register Src="~/UserControl/InfoMenu.ascx" TagName="Menu" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .divLeft
        {
            width: 165px;
            list-style: none;
            margin-left: 10px;
            margin-top: 20px;
            float: left;
        }
        .divRight
        {
            float: left;
            margin-top: 10px;
            margin-right: 10px;
        }
        .lbCursor
        {
            cursor: pointer;
        }
    </style>

    <script type="text/javascript">
        function CheckSave() {
            var strNumber = $("#<%=txtNumber.ClientID%>").val().Trim();
            var strChinese = $("#<%=txtChinese.ClientID%>").val().Trim();
            var strEnglish = $("#<%=txtEnglish.ClientID%>").val().Trim();
            if (strNumber == "" && strChinese == "" && strEnglish == "") {
                alert("请至少填写一项！");
                return false;
            }
            return true;
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
    <div style="width: 100%">
        <div class="divLeft">
            <uc1:Menu ID="uc1menu" runat="server" />
        </div>
        <div class="divRight" style="text-align: center;">
            <table>
                <tr>
                    <td>
                        添加新数据&nbsp;&nbsp;
                    </td>
                    <td style="text-align: right;">
                        通道编号：
                    </td>
                    <td style="text-align: left">
                        <asp:DropDownList ID="ddlChannel" runat="server" CssClass="dropnormal">
                        </asp:DropDownList>
                    </td>
                    <td style="text-align: right;">
                        二次号码关键字<span style="color: Red;">*</span>
                    </td>
                    <td style="text-align: left;">
                        <asp:TextBox ID="txtNumber" runat="server" CssClass="txtBoxNormal" MaxLength="50"></asp:TextBox>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td style="text-align: right;">
                        二次中文关键字<span style="color: Red;">*</span>
                    </td>
                    <td style="text-align: left;">
                        <asp:TextBox ID="txtChinese" runat="server" CssClass="txtBoxNormal" MaxLength="50"></asp:TextBox>
                    </td>
                    <td style="text-align: right;">
                        二次英文关键字<span style="color: Red;">*</span>
                    </td>
                    <td style="text-align: left;">
                        <asp:TextBox ID="txtEnglish" runat="server" CssClass="txtBoxNormal" MaxLength="50"></asp:TextBox>
                    </td>
                    <td align="center">
                        &nbsp;&nbsp;
                        <asp:Button ID="btnADD" runat="server" Text="添 加" CssClass="button_blue" Width="80px"
                            OnClick="btnADD_Click" OnClientClick="return CheckSave();" />
                    </td>
                </tr>
                <tr>
                    <td colspan="8" align="center">
                        <asp:Button ID="btnQuery" runat="server" Text="查 询" CssClass="button_green" Width="70px"
                            OnClick="btnQuery_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:Button ID="btnQueryAll" runat="server" Text="全部显示" CssClass="button_green" Width="70px"
                            OnClick="btnQueryAll_Click" />
                    </td>
                </tr>
            </table>
            <br />
            <asp:GridView ID="GVinfo" runat="server" AutoGenerateColumns="False" CssClass="reason_box"
                Font-Size="12px" CellPadding="0" BorderWidth="0px" BorderColor="#A6E1FF" Width="100%"
                OnRowDataBound="GVinfo_RowDataBound" OnRowCancelingEdit="GVinfo_RowCancelingEdit"
                OnRowDeleting="GVinfo_RowDeleting" OnRowEditing="GVinfo_RowEditing" OnRowUpdating="GVinfo_RowUpdating"
                AllowPaging="True" OnPageIndexChanging="GVinfo_PageIndexChanging" PageSize="15">
                <Columns>
                    <asp:TemplateField HeaderText="通道">
                        <EditItemTemplate>
                            <asp:DropDownList ID="ddlChannel" runat="server" CssClass="dropnormal">
                            </asp:DropDownList>
                            <asp:HiddenField ID="HFChannelNO" runat="server" Value='<%#Eval("ChannelNO") %>' />
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lbChannelNO" runat="server" Text='<%#Eval("ChannelNO") %>' CssClass="lbCursor"
                                ToolTip='<%# Bind("ChannelName") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle BorderColor="#4DA6FF" BorderWidth="1px" />
                        <ItemStyle BorderColor="#4DA6FF" BorderWidth="1px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="二次号码关键字">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtNumber" runat="server" Text='<%# Bind("TelNumber") %>' MaxLength="20"
                                CssClass="txtInfo"></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lbNumber" runat="server" Text='<%# Bind("TelNumber") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle BorderColor="#4DA6FF" BorderWidth="1px" />
                        <ItemStyle BorderColor="#4DA6FF" BorderWidth="1px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="二次中文关键字">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtChinese" runat="server" Text='<%# Bind("Chinese") %>' MaxLength="20"
                                CssClass="txtInfo"></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lbChinese" runat="server" Text='<%# Bind("Chinese") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle BorderColor="#4DA6FF" BorderWidth="1px" />
                        <ItemStyle BorderColor="#4DA6FF" BorderWidth="1px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="二次英文关键字">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtEnglish" runat="server" Text='<%# Bind("English") %>' MaxLength="20"
                                CssClass="txtInfo"></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lbEnglish" runat="server" Text='<%# Bind("English") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle BorderColor="#4DA6FF" BorderWidth="1px" />
                        <ItemStyle BorderColor="#4DA6FF" BorderWidth="1px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="管理" ItemStyle-Wrap="false">
                        <EditItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update"
                                Text="更新"></asp:LinkButton>
                            &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
                                Text="取消"></asp:LinkButton><asp:HiddenField ID="HF1" runat="server" Value='<%#Eval("ID") %>' />
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Edit"
                                Text="编辑"></asp:LinkButton>
                            &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Delete"
                                Text="删除" OnClientClick="return confirm('确定要删除?')"></asp:LinkButton><asp:HiddenField
                                    ID="HF2" runat="server" Value='<%#Eval("ID") %>' />
                        </ItemTemplate>
                        <HeaderStyle BorderColor="#4DA6FF" BorderWidth="1px" />
                        <ItemStyle BorderColor="#4DA6FF" BorderWidth="1px" Width="80px" />
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    <span style="color: Red; font-weight: bold;">没有数据！</span>
                </EmptyDataTemplate>
            </asp:GridView>
        </div>
    </div>
</asp:Content>
